﻿/*****************************************************************************
	SNEGA STG GAME ENGINE 0.7a
	Copyright (C) 2009, Xiaohan Tian (snega0223)
	
	http://code.google.com/p/sng-actionscript-stg-engine/
	
	This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License(LGPL) as
	published by the Free Software Foundation, either version 3 of the 
	License, or(at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Lesser General Public License for more details.
	
	You should have received a copy of the GNU Lesser General Public License
	along with this program.  If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/

package com.sng.stg.game.enemy.action 
{
	import com.sng.stg.game.enemy.*;
	
	/**
	 * ...
	 * @author snega
	 */
	public class EnemyMove extends EnemyAction
	{
		protected var _offsetPosX:int = 0;
		protected var _offsetPosY:int = 0;
		protected var _offsetRotX:int = 0;
		protected var _offsetRotY:int = 0;
		
		public function EnemyMove(monitorLife:Boolean, value:int, enemy:Enemy, x:int, y:int, u:int, v:int) 
		{
			super(monitorLife, value, enemy);
			
			this._offsetPosX = x;
			this._offsetPosY = y;
			this._offsetRotX = u;
			this._offsetRotY = v;
		}
		
		override public function execute():void {
			trace("[Action] (" + this._time + ") Hit EnemyMove.");
			
			this._enemy._offsetPosX = this._offsetPosX;
			this._enemy._offsetPosY = this._offsetPosY;
			this._enemy._offsetRotX = this._offsetRotX;
			this._enemy._offsetRotY = this._offsetRotY;
		}
		
	}
	
}